package com.glls.customer.feign.fallback;

import com.glls.common.R;
import com.glls.common.entity.Goods;
import com.glls.customer.feign.SearchFeignClient;
import org.springframework.stereotype.Component;

import java.util.Map;



@Component
public class SearchFeignClientFallBack implements SearchFeignClient {
    @Override
    public Goods search(Integer id) {

        Goods goods = new Goods(-1, "托底商品信息", 0.0);

        return goods;
    }

    @Override
    public R searchGoodsList(Goods goods) {
        return R.error().message("远程调用异常，返回托底数据").code(500);
    }

    @Override
    public Map save(Goods goods) {
        return Map.of();
    }

    @Override
    public Map update(Goods goods) {
        return Map.of();
    }

    @Override
    public Map deleteById(Integer id) {
        return Map.of();
    }

    @Override
    public Goods findJifenById(Long id) {
        return null;
    }


}
